home *** CD-ROM | disk | FTP | other *** search
/ ftp.cs.arizona.edu / ftp.cs.arizona.edu.tar / ftp.cs.arizona.edu / icon / newsgrp / group02b.txt / 000145_icon-group-sender_Mon Nov 25 07:54:49 2002.msg < prev    next >
Internet Message Format  |  2003-01-02  |  1KB

  1. Return-Path: <icon-group-sender>
  2. Received: (from root@localhost)
  3.     by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id gAPEpkw03382
  4.     for icon-group-addresses; Mon, 25 Nov 2002 07:51:46 -0700 (MST)
  5. Message-Id: <200211251451.gAPEpkw03382@baskerville.CS.Arizona.EDU>
  6. From: ernobe <ernobe@msn.com>
  7. X-Newsgroups: comp.lang.icon
  8. Subject: delete( L, i )
  9. Date: Sun, 24 Nov 2002 04:09:03 +0200
  10. X-Newsreader: MicroPlanet Gravity v2.50
  11. To: icon-group@cs.arizona.edu
  12. Errors-To: icon-group-errors@cs.arizona.edu
  13. Status: RO
  14.  
  15.  
  16.  
  17. I got an e-mail from Clint Jeffery in which he says that the delete( L, i ) 
  18. function is not part of Icon, but of Unicon.  Instead of bothering him with 
  19. more e-mails I thought I'd publish my results here in case some of you want to 
  20. help me figure out why it does work:
  21.  
  22.  
  23.  
  24. procedure main()
  25. me := [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ]
  26. ab := [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ]
  27. every 1 to 2 do 
  28. every delete( ab, !me )
  29. every writes( " ", string( ab[ 1 to 10 ] ) )
  30. end
  31.  
  32.  
  33. This program prints this:
  34.  
  35. 4 8
  36.  
  37. Which is what it should if delete(L, i) does work in Icon.
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44. -- 
  45. my esoteric links:
  46. http://www.costarricense.cr/pagina/ernobe/
  47.